<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<c:if test="${formData.excelURL != null }">
<div class="rpt03Container" >
	<div><a href="${formData.excelURL }"><spring:message code="report.download"/></a></div>
	<table width="90%"  class="rpt">
		<thead >
			<tr >
				<th >
					<spring:message code="report03.reportName.${formData.reportType }"/>
				</th>
				<th colspan="${fn:length(reportDataList.timeName)+2 }" class="header">
					
				</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<th><spring:message code="report03.table.header.month"/></th>
				<c:forEach items="${reportDataList.timeName }" var="headerData" varStatus="status">
				<th>${headerData }</th>
				</c:forEach>
				<th><spring:message code="report03.table.header.sum"/></th>
				<th><spring:message code="report03.table.header.percentage"/></th>
			</tr>
			<c:forEach items="${reportDataList.itemName }" var="itemData" varStatus="status">
			<tr>
				<th width="16%">
					<a href="${pageContext.request.contextPath}/report04/doPreview.do?reportType=PL&queryDetailItemCode=${reportDataList.itemCode[status.index] }&timeType=${formData.timeType }&fromReport=${formData.reportType }&defStartYear=${formData.defStartYear }&startYear=${formData.startYear }&endYear=${formData.endYear }">${itemData }</a>
				</th>
				<c:forEach items="${reportDataList.itemValue[status.index] }" var="valueData" varStatus="valueDataStatus">
				<td  width="60px">${valueData }</td>
				</c:forEach>
				<td  width="60px">${reportDataList.itemTotalSum[status.index] }</td>
				<td  width="60px">${reportDataList.itemTotalPercentage[status.index] }%</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	<P  class="chartContainer">
	<img src="${formData.imageURL }" usemap="#map0">
	</P>
</div>
</c:if>